import 'package:equatable/equatable.dart';

const kApiGooglePlayPurchasedItemIdentifierPurchaseTokenKey = 'purchase_token';
const kApiGooglePlayPurchasedItemIdentifierPurchaseItemSkuKey = 'purchase_item_sku';

class ApiGooglePlayPurchasedItemIdentifierDto extends Equatable {
  const ApiGooglePlayPurchasedItemIdentifierDto({
    required this.purchaseToken,
    required this.purchaseItemSku,
  });

  final String purchaseToken;
  final String purchaseItemSku;

  @override
  List<Object?> get props {
    return [
      purchaseToken,
      purchaseItemSku,
    ];
  }

  factory ApiGooglePlayPurchasedItemIdentifierDto.fromJson(Map<String, dynamic> json) {
    return ApiGooglePlayPurchasedItemIdentifierDto(
      purchaseToken: json[kApiGooglePlayPurchasedItemIdentifierPurchaseTokenKey],
      purchaseItemSku: json[kApiGooglePlayPurchasedItemIdentifierPurchaseItemSkuKey],
    );
  }
}
